package entity

type Menu struct {
	ID int64 `gorm:"column:id;type:BIGINT;primary_key" json:"id"`

	MenuLevel int `gorm:"column:menu_level;type:TINYINT" json:"menu_level"`

	ParentId int64 `gorm:"column:parent_id;type:BIGINT" json:"parent_id"`

	Path string `gorm:"column:path;type:VARCHAR(255)" json:"path"`

	Name string `gorm:"column:name;type:VARCHAR(255)" json:"name"`

	Hidden int `gorm:"column:hidden;type:TINYINT" json:"hidden"`

	Component string `gorm:"column:component;type:VARCHAR(255)" json:"component"`

	Sort int `gorm:"column:sort;type:TINYINT" json:"sort"`

	ActiveName string `gorm:"column:active_name;type:VARCHAR(255)" json:"active_name"`

	KeepAlive int `gorm:"column:keep_alive;type:TINYINT" json:"keep_alive"`

	DefaultMenu int `gorm:"column:default_menu;type:TINYINT" json:"default_menu"`

	Title string `gorm:"column:title;type:VARCHAR(255)" json:"title"`

	Icon string `gorm:"column:icon;type:VARCHAR(255)" json:"icon"`

	CloseTab int `gorm:"column:close_tab;type:TINYINT" json:"close_tab"`

	CreatedAt int64 `gorm:"column:created_at;type:BIGINT" json:"created_at"`

	UpdatedAt int64 `gorm:"column:updated_at;type:BIGINT" json:"updated_at"`

	Permission string `gorm:"column:permission;type:VARCHAR(255) json:"permission"`
}

func (a *Menu) TableName() string {
	return "menus"
}
